<script src="<?php echo base_url();?>js/knockout-1.2.1.js"></script>

<p>&nbsp;</p>
<div align="center">
  <h1>ตารางกรอกข้อมูลคุณภาพสินค้า Cut Size</h1>
</div>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0" class="font">
  <tr>
    <td width="6%" height="40">Type</td>
    <td width="18%" height="40"> :
      <select class="select" id="ticket1">
        <option value="PPC PMW">PPC PMW</option>
        <option value="LPP">LPP</option>
      </select></td>
    <td width="6%" height="40">Size</td>
    <td width="18%" height="40"> :
      <select name="ticket2" class="select" id="ticket5">
        <option value="A4">A4</option>
        <option value="A3">A3</option>
        <option value="B4">B4</option>
        <option value="B5">B5</option>
      </select></td>
    <td width="6%" height="40">Date</td>
    <td width="18%"> :
      <input id="datepicker" data-bind="value: departure" /></td>
    <td width="7%">Roll ID 1:</td>
    <td width="21%" height="40"><input name="textfield68" type="text" class="k-textbox" id="textfield67"/></td>
  </tr>
  <tr>
    <td height="40">Gram</td>
    <td height="40"> :
      <select class="select" id="ticket2">
        <option value="64">64</option>
        <option value="70">70</option>
        <option value="75">75</option>
        <option value="80">80</option>
        <option value="90">90</option>
        <option value="100">100</option>
      </select></td>
    <td height="40">Lot No.</td>
    <td height="40"> :
      <input name="textfield74" type="text" class="k-textbox" id="textfield72"/></td>
    <td height="40">Shift</td>
    <td> :
      <select name="ticket" class="select" id="ticket6">
        <option value="A">A</option>
        <option value="B">B</option>
        <option value="C">C</option>
      </select></td>
    <td>Roll ID 2:</td>
    <td height="40"><input name="textfield69" type="text" class="k-textbox" id="textfield68"/></td>
  </tr>
  <tr>
    <td height="40">Brand </td>
    <td height="40"> :
      <select class="select" id="ticket3">
        <option>Supreme</option>
        <option value="Supreme FSC">Supreme FSC</option>
        <option value="Ultimate">Ultimate</option>
        <option value="PPC WHITE">PPC WHITE</option>
        <option value="Eco Image">Eco Image</option>
        <option value="Idea Max">Idea Max</option>
        <option value="Idea Work">Idea Work</option>
        <option value="etc">etc</option>
      </select></td>
    <td height="40">Position</td>
    <td height="40"> :
      <select name="ticket6" class="select" id="ticket7">
        <option value="Start">Start</option>
        <option value="Befor Middle">Befor Middle</option>
        <option value="Middle">Middle</option>
        <option value="Befor End">Befor End</option>
        <option value="End">End</option>
      </select></td>
    <td height="40">Time</td>
    <td> :
      <input type="text" name="textfield2" id="timepicker" /></td>
    <td>Roll ID 3:</td>
    <td height="40"><input name="textfield70" type="text" class="k-textbox" id="textfield69"/></td>
  </tr>
  <tr>
    <td height="40">Grade</td>
    <td height="40"> :
      <select class="select" id="ticket4">
        <option value="A">A</option>
        <option value="H">H</option>
        <option value="R">R</option>
      </select></td>
    <td height="40">&nbsp;</td>
    <td height="40">&nbsp;</td>
    <td height="40">&nbsp;</td>
    <td>&nbsp;</td>
    <td>Roll ID 4:</td>
    <td height="40"><input name="textfield71" type="text" class="k-textbox" id="textfield70"/></td>
  </tr>
  <tr>
    <td height="40">Problem</td>
    <td height="40"> :
      <input name="textfield73" type="text" class="k-textbox" id="textfield3"/></td>
    <td height="40">&nbsp;</td>
    <td height="40">&nbsp;</td>
    <td height="40">&nbsp;</td>
    <td>&nbsp;</td>
    <td>Roll ID 5:</td>
    <td height="40"><input name="textfield72" type="text" class="k-textbox" id="textfield71"/></td>
  </tr>
</table>
<br />
<table width="99%" align="center">
  <tr>
    <td><div align="right">
        <input name="Submit" type="submit" class="k-button" value="บันทึกข้อมูล"/>
        &nbsp;
        <input name="Reset" type="submit" class="k-button" value="ยกเลิก"/>
      </div></td>
  </tr>
</table>
<table width="99%" align="center" class="font">
  <tr>
    <td><table id="grid">
        <thead>
          <tr>
            <th data-field="Properties_1">Properties Item</th>
            <th data-field="Value_1">Value</th>
            <th data-field="Unit_1">Unit</th>
            <th data-field="Properties_2">Properties Item</th>
            <th data-field="dse">Value</th>
            <th data-field="Value_2">Unit</th>
            <th data-field="Properties_3">Properties Item</th>
            <th data-field="Value_3">Value</th>
            <th data-field="Unit_3">Unit</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>น้ำหนักรวม</td>
            <td><input name="cs17_1" type="number" value="0" class="k-textbox number" id="cs17_1"/></td>
            <td>Tons ตัน</td>
            <td>Pen Writing Top</td>
            <td><input name="cs42_1" type="number" value="0" class="k-textbox number" id="cs42_1"/></td>
            <td>Plattern No.</td>
            <td>Temp.Thermo.(เปลือกห่อ)</td>
            <td><input name="cs67_1" type="number" value="0" class="k-textbox number" id="cs67_1"/></td>
            <td>°C</td>
          </tr>
          <tr>
            <td>Basis Weight</td>
            <td><input name="cs18_1" type="number" value="0" class="k-textbox number" id="cs18_1"/></td>
            <td>(g/m<sup>2</sup>)</td>
            <td>Pen Writing Bottom</td>
            <td><input name="cs43_1" type="number" value="0" class="k-textbox number" id="cs43_1"/></td>
            <td>Plattern No.</td>
            <td><strong>QC</strong></td>
            <td>&nbsp;</td>
            <td></td>
          </tr>
          <tr>
            <td>Thickness</td>
            <td><input name="cs19_1" type="number" value="0" class="k-textbox number" id="cs19_1"/></td>
            <td>(um)</td>
            <td>Stockigt Top</td>
            <td><input name="cs44_1" type="number" value="0" class="k-textbox number" id="cs44_1"/></td>
            <td>Second.</td>
            <td>ฉลากสินค้า(วัน,เวลา,LotNo.)</td>
            <td><input name="cs68_1" type="number" value="0" class="k-textbox number" id="cs68_1"/></td>
            <td>1 = ถูกต้อง,   2= ไม่ถูกต้อง</td>
          </tr>
          <tr>
            <td>Density</td>
            <td><input name="cs20_1" type="number" value="0" class="k-textbox number" id="cs20_1"/></td>
            <td>(g/cm<sup>3</sup>)</td>
            <td>Stockigt Bottom</td>
            <td><input name="cs45_1" type="number" value="0" class="k-textbox number" id="cs45_1"/></td>
            <td>Second.</td>
            <td>การติดกาวของห่อ</td>
            <td><input name="cs69_1" type="number" value="0" class="k-textbox number" id="cs69_1"/></td>
            <td>1=พอดี,2=น้อย,3=มาก,  4= กาวติดเนื้อกระดาษ</td>
          </tr>
          <tr>
            <td>Bulk</td>
            <td><input name="cs21_1" type="number" value="0" class="k-textbox number" id="cs21_1"/></td>
            <td>(cm<sup>3</sup>/g)</td>
            <td>Coefficent of Friction  Static</td>
            <td><input name="cs46_1" type="number" value="0" class="k-textbox number" id="cs46_1"/></td>
            <td>&nbsp;</td>
            <td>การวางแนวเกรนกระดาษ</td>
            <td><input name="cs70_1" type="number" value="0" class="k-textbox number" id="cs70_1"/></td>
            <td>1=Long grain,2=Shot grain</td>
          </tr>
          <tr>
            <td>Roughness (Top)</td>
            <td><input name="cs22_1" type="number" value="0" class="k-textbox number" id="cs22_1"/></td>
            <td>ml/min</td>
            <td>Coefficent of Friction  Kinetic</td>
            <td><input name="cs47_1" type="number" value="0" class="k-textbox number" id="cs47_1"/></td>
            <td>&nbsp;</td>
            <td>ความแน่นของห่อ ด้านบน</td>
            <td><input name="cs71_1" type="number" value="0" class="k-textbox number" id="cs71_1"/></td>
            <td>mm.</td>
          </tr>
          <tr>
            <td>Roughness (Bottom)</td>
            <td><input name="cs23_1" type="number" value="0" class="k-textbox number" id="cs23_1"/></td>
            <td>ml/min</td>
            <td>Flat Curl Before</td>
            <td><input name="cs48_1" type="number" value="0" class="k-textbox number" id="cs48_1"/></td>
            <td>mm.</td>
            <td>ความแน่นของห่อ ด้านล่าง</td>
            <td><input name="cs72_1" type="number" value="0" class="k-textbox number" id="cs72_1"/></td>
            <td>mm.</td>
          </tr>
          <tr>
            <td>Porosity</td>
            <td><input name="cs24_1" type="number" value="0" class="k-textbox number" id="cs24_1"/></td>
            <td>(s./100)</td>
            <td>Hanging Curl Before </td>
            <td><input name="cs49_1" type="number" value="0" class="k-textbox number" id="cs49_1"/></td>
            <td>mm.</td>
            <td>พื้นที่สกปรก ( Dirt )</td>
            <td><input name="cs73_1" type="number" value="0" class="k-textbox number" id="cs73_1"/></td>
            <td>ppm.</td>
          </tr>
          <tr>
            <td>Tensile Strenght MD</td>
            <td><input name="cs25_1" type="number" value="0" class="k-textbox number" id="cs25_1"/></td>
            <td>kN/m</td>
            <td>Flat Curl After F</td>
            <td><input name="cs50_1" type="number" value="0" class="k-textbox number" id="cs50_1"/></td>
            <td>mm.</td>
            <td>จำนวนแผ่นสกปรก /45 แผ่น</td>
            <td><input name="cs74_1" type="number" value="0" class="k-textbox number" id="cs74_1"/></td>
            <td>แผ่น</td>
          </tr>
          <tr>
            <td>Tensile Strenght CD</td>
            <td><input name="cs26_1" type="number" value="0" class="k-textbox number" id="cs26_1"/></td>
            <td>kN/m</td>
            <td>Flat Curl After W</td>
            <td><input name="cs51_1" type="number" value="0" class="k-textbox number" id="cs51_1"/></td>
            <td>mm.</td>
            <td>จำนวนแผ่น (500 แผ่น)</td>
            <td><input name="cs75_1" type="number" value="0" class="k-textbox number" id="cs75_1"/></td>
            <td>แผ่น</td>
          </tr>
          <tr>
            <td>Tensile Stretch MD</td>
            <td><input name="cs27_1" type="number" value="0" class="k-textbox number" id="cs27_1"/></td>
            <td>%</td>
            <td>Flat Curl After F-W</td>
            <td><input name="cs52_1" type="number" value="0" class="k-textbox number" id="cs52_1"/></td>
            <td>mm.</td>
            <td>ลักษณะขุยกระดาษ</td>
            <td><input name="cs76_1" type="number" value="0" class="k-textbox number" id="cs76_1"/></td>
            <td>No.</td>
          </tr>
          <tr>
            <td>Tensile Stretch CD</td>
            <td><input name="cs28_1" type="number" value="0" class="k-textbox number" id="cs28_1"/></td>
            <td>%</td>
            <td>Flat Curl After W-F</td>
            <td><input name="cs53_1" type="number" value="0" class="k-textbox number" id="cs53_1"/></td>
            <td>mm.</td>
            <td>ขนาดแผ่นกระดาษ</td>
            <td><input name="cs77_1" type="number" value="0" class="k-textbox number" id="cs77_1"/></td>
            <td>mm.</td>
          </tr>
          <tr>
            <td>Bending Stiffness MD</td>
            <td><input name="cs29_1" type="number" value="0" class="k-textbox number" id="cs29_1"/></td>
            <td>mN</td>
            <td>Hanging Curl After F</td>
            <td><input name="cs54_1" type="number" value="0" class="k-textbox number" id="cs54_1"/></td>
            <td>mm.</td>
            <td>ฉากกระดาษ ด้านกว้าง</td>
            <td><input name="cs78_1" type="number" value="0" class="k-textbox number" id="cs78_1"/></td>
            <td>mm.</td>
          </tr>
          <tr>
            <td>Bending Stiffness CD</td>
            <td><input name="cs30_1" type="number" value="0" class="k-textbox number" id="cs30_1"/></td>
            <td>mN</td>
            <td>Hanging Curl After W</td>
            <td><input name="cs55_1" type="number" value="0" class="k-textbox number" id="cs55_1"/></td>
            <td>mm.</td>
            <td>ฉากกระดาษ ด้านยาว</td>
            <td><input name="cs79_1" type="number" value="0" class="k-textbox number" id="cs79_1"/></td>
            <td>mm.</td>
          </tr>
          <tr>
            <td>Suf. Electric</td>
            <td><input name="cs31_1" type="number" value="0" class="k-textbox number" id="cs30_1"/></td>
            <td>Ohm</td>
            <td>Hanging Curl After F-W</td>
            <td><input name="cs56_1" type="number" value="0" class="k-textbox number" id="cs56_1"/></td>
            <td>mm.</td>
            <td>รอยหยักฟันปลา</td>
            <td><input name="cs80_1" type="number" value="0" class="k-textbox number" id="cs80_1"/></td>
            <td>mm.</td>
          </tr>
          <tr>
            <td>Water Absorp Top</td>
            <td><input name="cs32_1" type="number" value="0" class="k-textbox number" id="cs32_1"/></td>
            <td>(g/m<sup>2</sup>)</td>
            <td>Hanging Curl After W-F</td>
            <td><input name="cs57_1" type="number" value="0" class="k-textbox number" id="cs57_1"/></td>
            <td>mm.</td>
            <td>เฉดสีกระดาษ</td>
            <td><input name="cs81_1" type="number" value="0" class="k-textbox number" id="cs81_1"/></td>
            <td>1 = ไม่ต่าง,2= แตกต่าง</td>
          </tr>
          <tr>
            <td>Water Absorp Bottom</td>
            <td><input name="cs33_1" type="number" value="0" class="k-textbox number" id="cs33_1"/></td>
            <td>(g/m<sup>2</sup>)</td>
            <td>%R/H in room</td>
            <td><input name="cs58_1" type="number" value="0" class="k-textbox number" id="cs58_1"/></td>
            <td>%</td>
            <td>รอยตัด B/ F</td>
            <td><input name="cs82_1" type="number" value="0" class="k-textbox number" id="cs82_1"/></td>
            <td>No.</td>
          </tr>
          <tr>
            <td>ISO Brightness</td>
            <td><input name="cs34_1" type="number" value="0" class="k-textbox number" id="cs34_1"/></td>
            <td>%</td>
            <td>%R/H in ream</td>
            <td><input name="cs59_1" type="number" value="0" class="k-textbox number" id="cs59_1"/></td>
            <td>%</td>
            <td>รอยตัด D/ T</td>
            <td><input name="cs83_1" type="number" value="0" class="k-textbox number" id="cs83_1"/></td>
            <td>No.</td>
          </tr>
          <tr>
            <td>Opacity</td>
            <td><input name="cs35_1" type="number" value="0" class="k-textbox number" id="cs35_1"/></td>
            <td>%</td>
            <td>Weight/ream</td>
            <td><input name="cs60_1" type="number" value="0" class="k-textbox number" id="cs60_1"/></td>
            <td>Kg.</td>
            <td>ปัญหาที่พบตามลักษณะ</td>
            <td>&nbsp;</td>
            <td></td>
          </tr>
          <tr>
            <td>L*</td>
            <td><input name="cs36_1" type="number" value="0" class="k-textbox number" id="cs36_1"/></td>
            <td>&nbsp;</td>
            <td>High/ream</td>
            <td><input name="cs61_1" type="number" value="0" class="k-textbox number" id="cs61_1"/></td>
            <td>cm.</td>
            <td><input name="textfield77" type="text" class="k-textbox text" id="textfield76"/></td>
            <td><input name="cs84_1" type="number" value="0" class="k-textbox number" id="cs84_1"/></td>
            <td>แผ่น</td>
          </tr>
          <tr>
            <td>a*</td>
            <td><input name="cs37_1" type="number" value="0" class="k-textbox number" id="cs37_1"/></td>
            <td>&nbsp;</td>
            <td>Temp.หม้อต้มกาว (กล่อง)</td>
            <td><input name="cs62_1" type="number" value="0" class="k-textbox number" id="cs62_1"/></td>
            <td>°C</td>
            <td><input name="textfield78" type="text" class="k-textbox text" id="textfield77"/></td>
            <td><input name="cs85_1" type="number" value="0" class="k-textbox number" id="cs85_1"/></td>
            <td>แผ่น</td>
          </tr>
          <tr>
            <td>b*</td>
            <td><input name="cs38_1" type="number" value="0" class="k-textbox number" id="cs38_1"/></td>
            <td>&nbsp;</td>
            <td>Temp.Thermo. (กล่อง)</td>
            <td><input name="cs63_1" type="number" value="0" class="k-textbox number" id="cs63_1"/></td>
            <td>°C</td>
            <td><input name="textfield79" type="text" class="k-textbox text" id="textfield78"/></td>
            <td><input name="cs86_1" type="number" value="0" class="k-textbox number" id="cs86_1"/></td>
            <td>แผ่น</td>
          </tr>
          <tr>
            <td>CIE Whiteness</td>
            <td><input name="cs39_1" type="number" value="0" class="k-textbox number" id="cs39_1"/></td>
            <td>&nbsp;</td>
            <td>Temp.หม้อต้มกาว (ฝา)</td>
            <td><input name="cs64_1" type="number" value="0" class="k-textbox number" id="cs64_1"/></td>
            <td>°C</td>
            <td><input name="textfield80" type="text" class="k-textbox text" id="textfield79"/></td>
            <td><input name="cs87_1" type="number" value="0" class="k-textbox number" id="cs87_1"/></td>
            <td>แผ่น</td>
          </tr>
          <tr>
            <td>Moisture content</td>
            <td><input name="cs40_1" type="number" value="0" class="k-textbox number" id="cs40_1"/></td>
            <td>%</td>
            <td>Temp.Thermo. (ฝา)</td>
            <td><input name="cs65_1" type="number" value="0" class="k-textbox number" id="cs65_1"/></td>
            <td>°C</td>
            <td></td>
            <td></td>
            <td></td>
          </tr>
          <tr>
            <td>Filler</td>
            <td><input name="cs41_1" type="number" value="0" class="k-textbox number" id="cs41_1"/></td>
            <td>%</td>
            <td>Temp.หม้อต้มกาว(เปลือกห่อ)</td>
            <td><input name="cs66_1" type="number" value="0" class="k-textbox number" id="cs66_1"/></td>
            <td>°C</td>
            <td></td>
            <td></td>
            <td></td>
          </tr>
        </tbody>
      </table>
      <script>
                $(document).ready(function() {
                    $("#grid").kendoGrid({
						columns: [
						{ field: "Properties_1", width: "30px" },
						{ field: "Value_1", width: "13px" },
						{ field: "Unit_1",  width: "20px" },
						{ field: "Properties_2", width: "30px" },
						{ field: "Value_2", width: "13px" },
						{ field: "Unit_12", width: "20px" },
						{ field: "Properties_3", width: "30px" },
						{ field: "Value_3", width: "13px" },
						{ field: "Unit_3", width: "20px" }

						],
                        //height: 1000,
						//pageable: true,
						dataSource: {
						//pageSize: 12
						} 
                    });
                });
            </script></td>
  </tr>
</table>

<!--scrip list select--> 
<script>
                $(document).ready(function() {
                    var viewModel = {
                        chosenTicket: ko.observable(),
                        resetTicket: function() { this.chosenTicket(null) },
                    };
                    $("#ticket1").kendoDropDownList().trigger("change");
                    $("#ticket2").kendoDropDownList().trigger("change");
                    $("#ticket3").kendoDropDownList().trigger("change");
                    $("#ticket4").kendoDropDownList().trigger("change");
                    $("#ticket5").kendoDropDownList().trigger("change");
					$("#ticket6").kendoDropDownList().trigger("change");
					$("#ticket7").kendoDropDownList().trigger("change");

                });
      		</script> 
<!--scrip วัน-เดือน-ปี--> 
<script>
                $(document).ready(function() {
                    var today = new Date(),
                        birthdays = [
                           +new Date(today.getFullYear(), today.getMonth(), 11),
                           +new Date(today.getFullYear(), today.getMonth() + 1, 6),
                           +new Date(today.getFullYear(), today.getMonth() + 1, 27),
                           +new Date(today.getFullYear(), today.getMonth() - 1, 3),
                           +new Date(today.getFullYear(), today.getMonth() - 2, 22)
                        ];

                    $("#datepicker").kendoDatePicker({
                        value: today,
                        month: {
                            // template for dates in month view
                            content: '# if ($.inArray(+data.date, [' + birthdays + ']) != -1) { #' +
                                         '<div class="birthday"></div>' +
                                     '# } #' +
                                     '#= data.value #'
                        },
                        footer: "Today - #=kendo.toString(data, 'd') #"
                    });

                    $("#datepicker").data("kendoDatePicker")
                                    .dateView.calendar.element
                                    .width(300);
                });
            </script> 
<!--scrip เวลา--> 
<script>
                $(document).ready(function() {
                    // create TimePicker from input HTML element
                    $("#timepicker").kendoTimePicker();
                });
            </script>